﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div class="product-home">
    <div class="hottitle">
        <span><strong>Sản Phẩm Mới</strong></span>
    </div>
    <div class="hcat">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="hcat-rgh">
                    <div class="hcat-partner-hot" id="productlist">
                        <%  List<Partner> list = (List<Partner>)ViewData["NewPartner"];
                            int y = 0;
                            for (int i = 0; i < list.Count; i += 5)
                            {%>
                        <ul style="display:none">
                            <%for (int z = 0; z < 5; z++)
                              {
                                  if (y < list.Count)
                                  {
                                      Partner item = list[y]; %>
                            <li><a href="<%=FRouter._("sanpham",item.ID.ToString(),item.PartnerName) %>">
                                <img src="<%=Constants.PHOTO_PATH_ROOT_PARTNER + item.Logo%>" width="132" height="120" />
                                <div class="pname">
                                    <%=HttpUtility.HtmlEncode(item.PartnerName)%></div>
                            </a>
                                <div>
                                    <%=HttpUtility.HtmlEncode(item.Status)%></div>
                                <div class="pcprice">
                                    <%="Giá: " + (item.CurrentPrice == null ? "Call" : String.Format("{0:0,0} d", item.CurrentPrice))%>
                                </div>
                                <div>
                                    <span>Giá cũ: </span><span class="linethrough">
                                        <%=(item.OldPrice != null ? String.Format("{0:0,0} d", item.OldPrice) : "")%></span>
                                </div>
                                <div>
                                    <a href="<%=FRouter._("dathang",item.ID.ToString(),item.PartnerName)%>">
                                        <img class="nborder" src="../../Content/Images/muahang.jpg" /></a>
                                </div>
                            </li>
                            <%y++;
                                      }
                                  }%>
                        </ul>
                        <% }%>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $('#productlist').cycle({
            fx: 'scrollDown',
            pause: 1,
            delay: 4000
        });
    });
</script>
